<?php

namespace App;

class Loader
{
    static function register($name)
    {
        //echo $name;
        $s = explode('\\', $name); 
        print_r($s);
        //echo __NAMESPACE__;
        require ROOT_PATH . strtr($name, array('\\' => '/')) . '.php';
    }
}

spl_autoload_register(array('App\Loader', 'register'));
